/**
 * Initialize tinymce plugin
 */

// define base options for init tinymce
var tinymce_options = {
    script_url :  base_url + 'vendors/tiny_mce/tiny_mce.js',
    plugins: 'table,advimage,advlink,insertdatetime,paste,noneditable,nonbreaking',
    theme: 'advanced',
    theme_advanced_toolbar_location: 'top',
    theme_advanced_toolbar_align: 'left',
    theme_advanced_buttons1: 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,fontselect,fontsizeselect,|,cut,copy,paste,pastetext,pasteword,|,removeformat,|,link,unlink,image',
    theme_advanced_buttons2: 'undo,redo,|,forecolor,backcolor,|,search,replace,|,bullist,numlist,|,outdent,indent,|,tablecontrols,|,sub,sup,charmap',
    theme_advanced_buttons3: '',
    theme_advanced_resizing: false,
    forced_root_block: false,
    force_p_newlines: false,
    remove_linebreaks: false,
    force_br_newlines: true,
    remove_trailing_nbsp: false,
    verify_html: true,
    invalid_elements: 'script',
    width: '100%',
    convert_urls: false,
    relative_urls: false,
    language:"en",
    compress: true,
    media_strict: false,
    entity_encoding:'raw'
};

$().ready(function(){
	$('textarea.tinymce').tinymce(tinymce_options);
});
